/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   MainTenanceProject.java for com.pengtu.gsj.entity.jsbz    </p>
 * 
 * <p>最后修改 : $: 2017年8月7日-上午11:59:38 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jsbz;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;


/**
 * 
 * MainTenanceProject
 * 养护工程项目
 * 2017年8月7日 上午11:59:38
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JS_MAINTENANCEPROJECT")
public class MainTenanceProject extends IdEntity {

	private static final long serialVersionUID = -2195958416032863243L;
	
	private String projectName;			//项目名称
	private String year;				//年份
	private String projectType;			//项目类型
	private String projectNumber;		//项目编号
	private String diagnoses;			//诊断分析
	private String maintenancePlan;		//养护计划
	private String maintenanceEffect;	//养护效果
	private String remark;				//类型
	
	public MainTenanceProject() {
		
	}
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	@Column(name= "PROJECTNAME")
	public String getProjectName() {
		return projectName;
	}
	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}
	@Column(name= "YEAR")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name= "PROJECTTYPE")
	public String getProjectType() {
		return projectType;
	}
	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}
	@Column(name= "PROJECTNUMBER")
	public String getProjectNumber() {
		return projectNumber;
	}
	public void setProjectNumber(String projectNumber) {
		this.projectNumber = projectNumber;
	}
	@Column(name= "DIAGNOSES")
	public String getDiagnoses() {
		return diagnoses;
	}
	public void setDiagnoses(String diagnoses) {
		this.diagnoses = diagnoses;
	}
	@Column(name= "MAINTENANCEPLAN")
	public String getMaintenancePlan() {
		return maintenancePlan;
	}
	public void setMaintenancePlan(String maintenancePlan) {
		this.maintenancePlan = maintenancePlan;
	}
	@Column(name= "MAINTENANCEEFFECT")
	public String getMaintenanceEffect() {
		return maintenanceEffect;
	}
	public void setMaintenanceEffect(String maintenanceEffect) {
		this.maintenanceEffect = maintenanceEffect;
	}
	@Column(name= "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}
	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
